# encoding: utf-8
# @project: st2111 
# @file: exercise1.py
# @time: 2023/6/1 16:02
# @author: abcque
# @license: (C) Copyright 2013-2021
# @contact: abcque@outlook.com
# @IDE: PyCharm
# @desc:
import time

from selenium import webdriver
from selenium.webdriver import Keys, ActionChains
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By

if __name__ == "__main__":
    url = "https://www.jd.com"
    executable_path = "../drivers/chromedriver.exe"

    service = Service(executable_path=executable_path)
    brower = webdriver.Chrome(service=service)

    brower.maximize_window()

    brower.get(url=url)

    # 定位查找编辑框
    profit = brower.find_element(by=By.CLASS_NAME, value="user_profit_lk")

    action = ActionChains(brower)
    action.move_to_element(profit)
    action.click()
    action.perform()
    time.sleep(10)

    brower.quit()

